package com.atguigu.mock.entity;

import com.atguigu.common.base.entity.AutoIdBase;
import com.atguigu.common.comment.Comment;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import java.time.LocalDateTime;

@Entity
@Getter
@Setter
@NoArgsConstructor
@Comment(value = "员工表")
public class Employee extends AutoIdBase {
    @Comment(value = "员工姓名")
    private String name;
    @Comment(value = "员工类型：1.业务经办 2.风控员 3.风控经理 4.信审经办 5.一级评审员 6.一级评审加签人 7.二级评审员 8.总经理/分管总")
    private Long type;

    @Comment("部门")
    @ManyToOne
    private Department department;

    public Employee(LocalDateTime createTime, String name, Long type, Department department) {
        super(createTime);
        this.name = name;
        this.type = type;
        this.department = department;
    }
}
